Skip to content

Conversation

@arzonus
Copy link
Contributor

@arzonus arzonus commented Nov 14, 2025

What changed?
Added metrics to track shard assignment distribution and handover latency in the shard distributor service. This includes:

  • New ShardDistributorShardAssignmentDistributionLatency metric measuring time from shard assignment to distribution
  • New ShardDistributorShardHandoverLatency metric measuring handover time between executors
  • HandoverType enum (GRACEFUL/EMERGENCY) to distinguish handover types

Why?
To provide visibility into shard distribution performance and identify potential issues with shard handovers, particularly distinguishing between graceful and emergency handovers.

How did you test it?
Added comprehensive unit tests covering metric emission logic and shard statistics tracking.

Potential risks
Additional storage operations during heartbeat processing (mitigated by running metrics emission in background goroutine).

Release notes
Added shard handover latency metrics for monitoring distribution performance.

Documentation Changes
None required.

@arzonus arzonus changed the title feat(sharddistributor): add shard handover latency metrics feat(shard-distributor): add shard handover latency metrics Nov 14, 2025
@arzonus arzonus marked this pull request as draft November 18, 2025 08:47
@arzonus arzonus force-pushed the add-shard-handover-latency-metric branch 5 times, most recently from 53a34b4 to 096cd69 Compare November 24, 2025 12:18
@arzonus arzonus marked this pull request as ready for review November 24, 2025 12:21
@arzonus arzonus force-pushed the add-shard-handover-latency-metric branch 2 times, most recently from b49bcb7 to cb1371c Compare November 28, 2025 10:07
@arzonus arzonus force-pushed the add-shard-handover-latency-metric branch from cb1371c to 6018117 Compare December 1, 2025 13:51
@arzonus arzonus force-pushed the add-shard-handover-latency-metric branch from 8c6a8c1 to 3c724cd Compare December 2, 2025 10:34
@arzonus arzonus merged commit a88d516 into cadence-workflow:master Dec 2, 2025
41 checks passed
@arzonus arzonus deleted the add-shard-handover-latency-metric branch December 2, 2025 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants